Skip to content

Conversation

@valix25
Copy link

@valix25 valix25 commented May 14, 2025

Issue Number

Feature request issue: #960

Overview of PR

The current PR makes some small changes to variables of dayjs type to be of type number instead to allow flexibility when dealing with custom types.
Additions to src/lib/default-config.ts and src/lib/types/main.ts to define the custom scale types and labels. This ideally would be injected by a user through the timeline props to create custom scales.
Small changes in src/lib/headers/... and src/lib/columns/Columns.tsx to have separation between the original calendar types and custom timescale types, and dayjs adjustments.
Small changes in src/lib/Timeline.tsx with regards to dayjs.
Main changes are in src/lib/utility/calendar.tsx to process and use a custom timescale.
There are additions in the demo files (demod/src/demo-custom/...) for illustration purposes of the workings of a custom timescale.

The changes are by no means complete, there would still be things to refactor and improve, while additionally being able to inject these custom types through the timeline props and not only just statically define them as in the current PR. Since such a feature could be achieved without many changes as shown in this PR, the hope is that the authors and maintainers of the original library would allow the inclusion of such a feature and then we can develop it to be ready to be part of the official release.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the rest not work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the other demo examples? They do, I commented them temporarily as I found the development easier. I'll uncomment them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants